/**
 * 
 */
package example.topic.dal.object;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Document;

import com.vanstone.fs.weedfs.WeedFSFile;

/**
 * @author shipeng
 *
 */
@Document(collection = "topic_question")
public class TopicQuestionDO {

  @Id
  private Long id;
  private Date sysInsertTime;
  private String questionContent;
  private String remark;
  private long clickcount = 0;
  private long commentcount = 0;
  private long answercount = 0;
  private List<Long> tagids = new ArrayList<>();
  private boolean deleted = false;
  private List<WeedFSFile> imageFiles = new ArrayList<>();

  public Long getId() {
    return id;
  }

  public void setId(Long id) {
    this.id = id;
  }

  public Date getSysInsertTime() {
    return sysInsertTime;
  }

  public void setSysInsertTime(Date sysInsertTime) {
    this.sysInsertTime = sysInsertTime;
  }

  public String getQuestionContent() {
    return questionContent;
  }

  public void setQuestionContent(String questionContent) {
    this.questionContent = questionContent;
  }

  public String getRemark() {
    return remark;
  }

  public void setRemark(String remark) {
    this.remark = remark;
  }

  public long getClickcount() {
    return clickcount;
  }

  public void setClickcount(long clickcount) {
    this.clickcount = clickcount;
  }

  public long getCommentcount() {
    return commentcount;
  }

  public void setCommentcount(long commentcount) {
    this.commentcount = commentcount;
  }

  public long getAnswercount() {
    return answercount;
  }

  public void setAnswercount(long answercount) {
    this.answercount = answercount;
  }

  public List<Long> getTagids() {
    return tagids;
  }

  public void setTagids(List<Long> tagids) {
    this.tagids = tagids;
  }

  public void addTagid(Long tagid) {
    if (tagid == null) {
      return;
    }
    this.tagids.add(tagid);
  }

  public boolean isDeleted() {
    return deleted;
  }

  public void setDeleted(boolean deleted) {
    this.deleted = deleted;
  }

  public List<WeedFSFile> getImageFiles() {
    return imageFiles;
  }

  public void setImageFiles(List<WeedFSFile> imageFiles) {
    this.imageFiles = imageFiles;
  }

}
